// run: $exec < input > output
#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <queue>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <complex>
#include <cassert>
// #pragma comment(linker,"/STACK:102400000,102400000")
using namespace std;
#define LL long long
#define pb push_back
#define mp make_pair
#define x first
#define y second
#define MAXN 100005
#define lson pos << 1
#define rson pos << 1 | 1
template <typename T> inline void checkMax(T &a, T b) {a = a>b?a:b;}
template <typename T> inline void checkMin(T &a, T b) {a = a<b?a:b;}
typedef pair<int, int> PII;
typedef vector<int> vi;
const double PI = acos(-1.0);
const double eps = 1e-8;

	template<class T>
inline T IN(T& num)
{
	num = 0;
	char c = getchar(), f = 0;
	while(c != '-' && (c < '0' || c > '9')) c = getchar();
	if(c == '-') f = 1, c = getchar();
	while('0' <= c && c <= '9') num = num * 10 + c - '0', c = getchar();
	if(f) num = -num;
	return num;
}

int N, M, Q;

int head[MAXN], cnt;

struct Edge {
	int v, next;
} p[MAXN << 1];

vector<int> peo[MAXN];

void init() {
	memset(head, -1, sizeof(head));
	cnt = 0;
	memset(p, 0, sizeof(p));
}

void addEdge(int u, int v) {
	p[cnt].v = v;
	p[cnt].next = head[u];
	head[u] = cnt ++;
}

int fa[MAXN], son[MAXN], depth[MAXN], sz[MAXN], top[MAXN], w[MAXN], total, id[MAXN];

void dfs1(int u, int pre, int dep) {
	fa[u] = pre, sz[u] = 1, depth[u] = dep, son[u] = 0;
	for (int i = head[u]; i != -1; i = p[i].next) {
		int v = p[i].v;
		if (v != pre) {
			dfs1(v, u, dep + 1);
			sz[u] += sz[v];
			if (sz[son[u]] < sz[v]) {
				son[u] = v;
			}
		}
	}
}

void dfs2(int u, int tp) {
	w[u] = ++ total;
	id[total] = u;
	top[u] = tp;
	if (son[u]) {
		dfs2(son[u], tp);
	}
	for (int i = head[u]; i != -1; i = p[i].next) {
		int v = p[i].v;
		if (v != fa[u] && v != son[u]) {
			dfs2(v, v);
		}
	}
}

vector<int> Segs[MAXN << 2];

void merge(vector<int> &ans, vector<int> &a, vector<int> &b) {
	ans.clear();
	int pa = 0, pb = 0;
	while (ans.size() < 10 && pa < a.size() && pb < b.size()) {
		if (a[pa] < b[pb]) {
			ans.pb(a[pa ++]);
		} else {
			ans.pb(b[pb ++]);
		}
	}
	while (ans.size() < 10 && pa < a.size()) {
		ans.pb(a[pa ++]);
	}
	while (ans.size() < 10 && pb < b.size()) {
		ans.pb(b[pb ++]);
	}
}

void build(int l, int r, int pos) {
	if (l == r) {
		int len = min(10, (int)peo[id[l]].size());
		for (int i = 0; i < len; i ++) {
			Segs[pos].pb(peo[id[l]][i]);
		}
		return ;
	}
	int mid = (l + r) >> 1;
	build(l, mid, lson);
	build(mid + 1, r, rson);
	merge(Segs[pos], Segs[lson], Segs[rson]);
}

vector<int> query(int l, int r, int L, int R, int pos) {
	if (l <= L && R <= r) {
		return Segs[pos];
	}
	int mid = (L + R) >> 1;
	vector<int> q, q1, q2;
	if (mid >= l) {
		q1 = query(l, r, L, mid, lson);
	}
	if (mid < r) {
		q2 = query(l, r, mid + 1, R, rson);
	}
	if (q1.size() > 0 && q2.size() > 0) {
		merge(q, q1, q2);
	} else if (q1.size() > 0) {
		q = q1;
	} else {
		q = q2;
	}
	return q;
}

vector<int> Tmp;

vector<int> change(int u, int v) {
	vector<int> q;
	while (top[u] != top[v]) {
		if (depth[top[u]] < depth[top[v]]) {
			swap(u, v);
		}
		vector<int> tmp = query(w[top[u]], w[u], 1, N, 1);
		if (q.size() > 0) {
			Tmp = q;
			merge(q, Tmp, tmp);
		} else {
			q = tmp;
		}
		u = fa[top[u]];
	}
	if (depth[u] > depth[v]) {
		swap(u, v);
	}
	vector<int> tmp = query(w[u], w[v], 1, N, 1);
	if (q.size() > 0) {
		Tmp = q;
		merge(q, Tmp, tmp);
	} else {
		q = tmp;
	}
	return q;
}

void work() {
	init();
	for (int i = 1; i < N; i ++) {
		int u, v;
		IN(u), IN(v);
		addEdge(u, v);
		addEdge(v, u);
	}
	dfs1(1, 0, 1);
	dfs2(1, 1);
	for (int i = 1; i <= M; i ++) {
		int c;
		IN(c);
		peo[c].pb(i);
	}
	for (int i = 1; i <= N; i ++) {
		sort(peo[i].begin(), peo[i].end());
	}
	build(1, N, 1);
	for (int i = 1; i <= Q; i ++) {
		int u, v, a;
		IN(u);
		IN(v);
		IN(a);
		vector<int> ans = change(u, v);
		int anslen = min((int)ans.size(), a);
		printf("%d", anslen);
		for (int i = 0; i < anslen; i ++) {
			printf(" %d", ans[i]);
		}
		printf("\n");
	}
}
int main() {
#ifdef __SKT__
	freopen("in1", "r", stdin);
#endif
	while (scanf("%d %d %d", &N, &M, &Q) != EOF) {
		work();
	}
	return 0;
}
